<template>
    <div>
        <p>这是一个局部组件</p>
    <button @click="addOne">点击减1</button>
    <p>{{ count }}</p>
    </div>
</template>
<script>
export default{
    name: "LocalComDemo",
    data() {
        return{
            count: 0
        }
    },
    methods:{
        addOne(){
            this.count--
        }
    }
}
</script>
<style scoped>
    p {
        color: red;
    }
</style>